package com.wanlong.sys.service.impl;

import com.wanlong.sys.dao.SysUserRoleMapper;
import com.wanlong.sys.service.ISysUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 万龙
 * @name
 * @project_name wanlong
 * @package_name com.wanlong.sys.service.impl
 * @description
 * @date 2019/2/28
 */
@Service
public class SysUserRoleService implements ISysUserRoleService {
    @Autowired
    private SysUserRoleMapper sysUserRoleMapper;

    public void cleanById(long userId) {
        sysUserRoleMapper.cleanById(userId);
    }

    public Long[] getRolesByUser(long userId) {
        Long[] roles =sysUserRoleMapper.getRolesByUser(userId);
        return roles;
    }
}
